function isEmpty(str) {
  return str === null || str === "" || str === undefined;
}

function endWith(str, suffix) {
  const reg = new RegExp(`${suffix}$`);
  return reg.test(str);
}

function startWith(str, prefix) {
  const reg = new RegExp(`^${prefix}`);
  return reg.test(str);
}

module.exports = {
  isEmpty,
  endWith,
  startWith,
};
